]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
windowManager: Small cleanup
authorFlorian Müllner <fmuellner@gnome.org>
Sun, 22 Jul 2018 01:31:54 +0000 (03:31 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 6 Aug 2019 12:52:41 +0000 (14:52 +0200)
We start with a dim factor of 0, so the syncEnabled() call in the
constructor will always disable the effect. Just create the effect
disabled and save the method call.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/654

js/ui/windowManager.js

index 44774f09511319094c688cf739461024d01b5684..04046b1310ade4e185995cae14b8c14918920d73 100644 (file)
@@ -117,12 +117,13 @@ class DisplayChangeDialog extends ModalDialog.ModalDialog {
 
 var WindowDimmer = class {
     constructor(actor) {
-        this._brightnessEffect = new Clutter.BrightnessContrastEffect();
+        this._brightnessEffect = new Clutter.BrightnessContrastEffect({
+            enabled: false
+        });
         actor.add_effect(this._brightnessEffect);
         this.actor = actor;
         this._enabled = true;
         this._dimFactor = 0.0;
-        this._syncEnabled();
     }
 
     _syncEnabled() {